package com.ssy.lingxi.dataauth.model.dto;

import java.io.Serializable;
import java.util.Objects;

/**
 * 渠道权限 ： 对会员本身、下级渠道会员的会员Id，角色Id 的缓存Dto对象
 * @author 万宁
 * @version 2.0.0
 * @date 2021-04-10
 */
public class ChannelAuthMemberDto implements Serializable {
    private static final long serialVersionUID = 1101446081321817185L;

    public ChannelAuthMemberDto() {
    }

    public ChannelAuthMemberDto(Long memberId, Long roleId) {
        this.memberId = memberId;
        this.roleId = roleId;
    }

    private Long memberId;

    private Long roleId;

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ChannelAuthMemberDto memberDto = (ChannelAuthMemberDto) o;
        return memberId.equals(memberDto.memberId) &&
                roleId.equals(memberDto.roleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(memberId, roleId);
    }
}
